package com.yoosora.service;

import com.yoosora.common.mode.request.IDOperatorRequest;
import com.yoosora.common.mode.request.IDQueryRequest;
import com.yoosora.common.mode.request.plugin.PluginOtherRequest;
import com.yoosora.common.mode.request.plugin.PluginPageRequest;
import com.yoosora.common.mode.request.plugin.PluginSaveRequest;
import com.yoosora.common.mode.response.BasicResponse;
import com.yoosora.common.mode.response.MultiResponse;
import com.yoosora.common.mode.response.PageableResponse;
import com.yoosora.common.mode.response.SingleResponse;
import com.yoosora.model.PluginDTO;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author yoosora
 */
public interface PluginService {
	/**
	 * 插入
	 * @param request
	 * @return
	 */
	SingleResponse<Long> save(@RequestBody final PluginSaveRequest request);

	/**
	 * 删除
	 * @param request
	 * @return
	 */
	BasicResponse delete(@RequestBody final IDOperatorRequest<Long> request);

	/**
	 * 主键查询
	 * @param request
	 * @return
	 */
	SingleResponse<PluginDTO> queryByPK(@RequestBody final IDQueryRequest<Long> request);

	/**
	 * 分页查询
	 * @param request
	 * @return
	 */
	PageableResponse<PluginDTO> queryPage(final @RequestBody PluginPageRequest request);

	/**
	 * 多行查询
 	 * @param request
	 * @return
	 */	
	MultiResponse<PluginDTO> queryList(final @RequestBody PluginOtherRequest request);
}
